<!DOCTYPE html>
<html lang="{{ lang or 'en' }}" {% if scrollbar %} class="esl-scrollable-content" {% endif %}>
  <head>
    <title>{{ seoTitle or title or site.description }}</title>
    <link rel="canonical" href="{{page.url | canonical | url }}"/>
    {# Site meta information #}
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    {% if description %}
      <meta name="description" content="{{ description | escape}}">
    {% endif %}
    {%if keywords %}
      <meta name="keywords" content="{{keywords}}">
    {% endif %}

    {%if redirect %}
      <script> window.location.replace('{{ redirect | url }}'); </script>
    {% endif %}

    {# Additional site meta information #}
    {% block meta %}{% endblock meta %}
    {# Site icon #}
    <link rel="icon" type="image/png" href="{{ '/assets/logo-64x64.png' | url }}"/>

    {% if not env.isDev %}
      {% include 'analytics.njk' %}
    {% endif %}
    {% block polyfils %}
      {% include 'polyfill.njk' %}
    {% endblock %}
    {% block headlib %}
      <link rel="stylesheet" type="text/css" href="{{ '/bundles/site.css' | url }}"/>
    {% endblock %}
    {% block head %}{% endblock %}
  </head>
  <body>
    <div class="page {{ baseClass }}">
      {% block content %}{% endblock %}
    </div>

    {% block body %}{% endblock %}

    {% if scrollbar %}
      <esl-scrollbar class="page-scrollbar" target="html"></esl-scrollbar>
    {% endif %}

    {% block bodylib %}
      <script src="{{ '/bundles/site.js' | url }}"></script>
   {% endblock %}
  </body>
</html>
